import axios from '@/request/http'
import { commonOutDTO } from '@/api/common.d'
import {
  SxmlsQueryParam,
  SxmlsQueryResult,
  YspmlSaveInputDTO,
  YspmlSaveOutputDTO,
  ZpmlSaveInputDTO,
  ZpmlSaveOutputDTO,
  SxmlDeleteInputDTO,
  SxmlDeleteOutputDTO,
  SxwjDeleteInputDTO,
  SxwjDeleteOutputDTO,
  YspmlxxGetInputDTO,
  YspmlxxGetOutputDTO,
  ZpmlxxGetInputDTO,
  ZpmlxxGetOutputDTO,
  SxwjGetInputDTO,
  SxwjGetOutputDTO,
  SxwjmlUpdateInputDTO,
  SxwjmlUpdateOutputDTO,
  SxplxgjlAddInputDTO,
  SxplxgjlAddOutputDTO,
  SxwjUploadInputDTO,
  SxwjUploadOutputDTO,
  YspzdOutputDTO,
  SxmlsbybmsahQueryParam,
} from './yspgl-dto'

export default class yspglService {
  /**
   * 获取声像目录树
   */
  static querySxmls(data: SxmlsQueryParam): Promise<commonOutDTO<any>> {
    return axios.post('/api/yspgl/querySxmls', data)
  }
  /**
   * 通过bmsah获取声像目录树
   */
  static querySxmlsByBmsah(data: SxmlsbybmsahQueryParam): Promise<commonOutDTO<any>> {
    return axios.post('/api/yspgl/querySxmlsByBmsah', data)
  }
  /**
   * 保存音视频目录信息
   */ //YspmlSaveInputDTO
  static saveYspml(data: any, ajbh: string): Promise<commonOutDTO<YspmlSaveOutputDTO>> {
    return axios.post('/api/yspgl/saveYspml', data, {
      headers: {
        ajbh,
      },
    })
  }
  /**
   * 保存照片目录信息
   */
  static saveZpml(data: ZpmlSaveInputDTO, ajbh: string): Promise<commonOutDTO<ZpmlSaveOutputDTO>> {
    return axios.post('/api/yspgl/saveZpml', data, {
      headers: {
        ajbh,
      },
    })
  }
  /**
   * 删除声像目录
   */
  static deleteSxml(
    data: SxmlDeleteInputDTO,
    ajbh?: string,
  ): Promise<commonOutDTO<SxmlDeleteOutputDTO>> {
    return axios.post('/api/yspgl/deleteSxml', data, {
      headers: {
        ajbh,
      },
    })
  }
  /**
   * 删除声像文件
   */
  static deleteSxwj(
    data: SxwjDeleteInputDTO,
    ajbh?: string,
  ): Promise<commonOutDTO<SxwjDeleteOutputDTO>> {
    return axios.post('/api/yspgl/deleteSxwj', data, {
      headers: {
        ajbh,
      },
    })
  }
  /**
   * 获取音视频目录信息
   */
  static getYspmlxx(data: YspmlxxGetInputDTO): Promise<commonOutDTO<YspmlxxGetOutputDTO>> {
    return axios.post('/api/yspgl/getYspmlxx', data)
  }
  /**
   * 获取照片目录信息
   */
  static getZpmlxx(data: ZpmlxxGetInputDTO): Promise<commonOutDTO<ZpmlxxGetOutputDTO>> {
    return axios.post('/api/yspgl/getZpmlxx', data)
  }
  /**
   * 获取声像文件
   */
  static getSxwj(data: SxwjGetInputDTO): Promise<commonOutDTO<SxwjGetOutputDTO[]>> {
    return axios.post('/api/yspgl/getSxwj', data)
  }
  /**
   * 修改声像文件目录
   */
  static updateSxwjml(
    data: SxwjmlUpdateInputDTO,
    ajbh?: string,
  ): Promise<commonOutDTO<SxwjmlUpdateOutputDTO>> {
    return axios.post('/api/yspgl/updateSxwjml', data, {
      headers: {
        ajbh,
      },
    })
  }
  /**
   * 新增声像批量修改记录
   */ //SxplxgjlAddInputDTO
  static addSxplxgjl(data: any, ajbh?: string): Promise<commonOutDTO<SxplxgjlAddOutputDTO>> {
    return axios.post('/api/yspgl/addSxplxgjl', data, {
      headers: {
        ajbh,
      },
    })
  }
  /**
   * 上传声像文件
   */ //SxwjUploadInputDTO
  static uploadSxwj(data: any, ajbh?: string): Promise<commonOutDTO<SxwjUploadOutputDTO>> {
    return axios.post('/api/yspgl/uploadSxwj', data, {
      headers: {
        ajbh,
      },
    })
  }

  /**
   * 获取音视频字段
   */ //SxwjUploadInputDTO
  static queryYspzd(data: any): Promise<commonOutDTO<YspzdOutputDTO[]>> {
    return axios.post('/api/yspgl/queryYspzd', data)
  }
}
